<template>
  <div class="wrapper">
    <head-page id="backstyle">
      <div class="rows-1 text-center">{{ $route.query.title }}</div>
    </head-page>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(item, index) in list.minePic" :key="index">
        <img :src="getImgUrl(item)" alt="" />
      </van-swipe-item>
    </van-swipe>
    <div class="war">
      <div class="area-center bold-size">
        <p class="richText" v-if="list.mineText" v-html="list.mineText"></p>
        <p v-else class="tac">暂无数据</p>
      </div>
    </div>
  </div>
</template>
<script>
import { selectSon } from "@/api/index";
export default {
  data() {
    return {
      list: {
        mineText: "",
      },
    };
  },
  watch: {},
  computed: {},
  mounted() {
    selectSon({
      id: this.$route.query.id,
    }).then((res) => {
      if (res.data.code == 200) {
        // this.list = res.data.data ? res.data.data : ''
        // this.list.minePic = this.splitImg(this.list.minePic)
        this.list.mineText = this.dataHTML(res.data.msg);
      }
    });
  },
  methods: {
    getImgUrl(img) {
      return this.montageImgUrl(img);
    },
  },
};
</script>
<style scoped>
.my-swipe img {
  width: 100%;
  height: 2rem;
}
.center {
  padding: 0.1rem;
}
</style>